package exam.common.util;

public class CommonUtil {
	/**
	 * 
	 * @param obj
	 * @return Integer
	 */
	public static int lengthObject(Object obj) {
		// local.length
		int length = -1;
		// IF obj <> NULL
		if(NullCheckUtil.isNotNull(obj)) {
			length = obj.toString().length();
		}
		return length;
	}
	
	/**
	 * 
	 * @param arrayObject
	 * @return Integer
	 */
	public static int lengthArrayObject(Object[] arrayObject) {
		// local.length
		int length = -1;
		// IF arrayObject <> NULL
		if(NullCheckUtil.isNotNull(arrayObject)) {
			length = arrayObject.length;
		}
		return length;
	}
}
